package org.cloud.admin.auth.client.client;

import org.cloud.admin.auth.client.config.FeignLoggerConfig;
import org.cloud.admin.auth.client.fallbackfactory.SysAuthClientFallbackFactory;
import org.cloud.common.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 
 * @author wangyuan
 * @since 2019年6月5日 上午11:14:59
 *
 */
@FeignClient(value = "cloud-admin-auth", fallbackFactory = SysAuthClientFallbackFactory.class, configuration = FeignLoggerConfig.class)
public interface SysAuthClient {
	
	/**
	 * 鉴权
	 * @param requestUri
	 * @return
	 */
	@RequestMapping(value = "/auth/service", method = RequestMethod.POST)
	public R authenticateService(@RequestParam("accessToken")String accessToken, @RequestParam("requestUri")String requestUri);
}
